<template>
  <div class="block">
    <el-image :scr="scr" class="img-container">
      <template #error>
        <img v-if=" Math.random() > 0.5" src="./head.jpg" alt="">
        <img v-else src="./hear2.jpg" alt="">
      </template>
    </el-image>
  </div>
</template>

<script>
export default {
  name: 'ImageHolder',
  props: {
    scr: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
    }
  },
  computed: {
  },
  methods: {
  }
}
</script>

<style scoped lang="scss">
.img-container {
  border-radius: 50%;
  ::v-deep img{
    width: 100%;
    height: 100%;
  }
}
</style>
